package com.numberone.master.modules.card.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.numberone.master.common.persistence.DataEntity;

/**
 * 流量卡充值流水Entity
 * @author ck
 * @version 2018-07-12
 */
public class CardRechargeFlow extends DataEntity<CardRechargeFlow> {
	
	private static final long serialVersionUID = 1L;
	private String iccid;		// 卡iccid
	private int payType;		// 0：支付宝
	private Double amount;		// 充值金额
	private Date createTime;	// 录入预订单时间
	private Date payTime;		//支付时间
	private Date invalidTime;	//失效时间
	private int state;		// 0：等待充付款 1：充值成功 2：充值失败
	private int flowType;		// 0:余额充值  1：套餐充值
	private int packId;      //所属套餐
	private String orderId;     //订单编号
	private String pkName;		//套餐名称
	private int rechargeState; //是否充值
	
	public CardRechargeFlow() {
		super();
	}

	public CardRechargeFlow(String id){
		super(id);
	}

	@Length(min=0, max=50, message="卡iccid长度必须介于 0 和 50 之间")
	public String getIccid() {
		return iccid;
	}

	public void setIccid(String iccid) {
		this.iccid = iccid;
	}
	
	public int getPayType() {
		return payType;
	}

	public void setPayType(int payType) {
		this.payType = payType;
	}

	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public int getFlowType() {
		return flowType;
	}

	public void setFlowType(int flowType) {
		this.flowType = flowType;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getPayTime() {
		return payTime;
	}

	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getInvalidTime() {
		return invalidTime;
	}

	public void setInvalidTime(Date invalidTime) {
		this.invalidTime = invalidTime;
	}

	public String getPkName() {
		return pkName;
	}

	public void setPkName(String pkName) {
		this.pkName = pkName;
	}

	public int getRechargeState() {
		return rechargeState;
	}

	public int getPackId() {
		return packId;
	}

	public void setPackId(int packId) {
		this.packId = packId;
	}

	public void setRechargeState(int rechargeState) {
		this.rechargeState = rechargeState;
	}



}